package TemplateMethodCode.ConcreteAccount;

import TemplateMethodCode.AbstractAccount;

public class SavingAccount extends AbstractAccount {
    static double interestRate = 0.035;

    public SavingAccount(double money, double year) {
        super(money, year);
    }


    @Override
    protected String getAccountType() {
        return "定期账户";
    }

    @Override
    protected double computeInterest() {
        return super.money*interestRate*super.year;
    }
}